import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home/Home.vue'
import Friend from '../views/friend/firend.vue'
import Search from '../views/search/search.vue'
import Cart from '../views/cart/cart.vue'
//   注册路由
Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    component: Home,
    meta: {
      title: 'home',
      active: 0
    }
  },
  {
    path: '/cart',
    component: Cart,
    meta: {
      title: 'cart',
      active: 3
    }
  },
  {
    path: '/search',
    component: Search,
    meta: {
      title: 'search',
      active: 1
    }
  },
  {
    path: '/friend',
    component: Friend,
    meta: {
      title: 'friend',
      active: 2
    }
  }
]
const router = new VueRouter({
  routes
})
export default router




